home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / include / gnome-vfs-2.0 / libgnomevfs / gnome-vfs-drive.h < prev    next >
Encoding:
C/C++ Source or Header  |  2006-05-01  |  3.9 KB  |  99 lines

  1. /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
  2. /* gnome-vfs-drive.h - Handling of drives for the GNOME Virtual File System.
  3.  
  4.    Copyright (C) 2003 Red Hat, Inc
  5.  
  6.    The Gnome Library is free software; you can redistribute it and/or
  7.    modify it under the terms of the GNU Library General Public License as
  8.    published by the Free Software Foundation; either version 2 of the
  9.    License, or (at your option) any later version.
  10.  
  11.    The Gnome Library is distributed in the hope that it will be useful,
  12.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  13.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  14.    Library General Public License for more details.
  15.  
  16.    You should have received a copy of the GNU Library General Public
  17.    License along with the Gnome Library; see the file COPYING.LIB.  If not,
  18.    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  19.    Boston, MA 02111-1307, USA.
  20.  
  21.    Author: Alexander Larsson <alexl@redhat.com>
  22. */
  23.  
  24. #ifndef GNOME_VFS_DRIVE_H
  25. #define GNOME_VFS_DRIVE_H
  26.  
  27. #include <glib-object.h>
  28. #include <libgnomevfs/gnome-vfs-volume.h>
  29.  
  30. G_BEGIN_DECLS
  31.  
  32. #define GNOME_VFS_TYPE_DRIVE        (gnome_vfs_drive_get_type ())
  33. #define GNOME_VFS_DRIVE(o)          (G_TYPE_CHECK_INSTANCE_CAST ((o), GNOME_VFS_TYPE_DRIVE, GnomeVFSDrive))
  34. #define GNOME_VFS_DRIVE_CLASS(k)    (G_TYPE_CHECK_CLASS_CAST((k), GNOME_VFS_TYPE_DRIVE, GnomeVFSDriveClass))
  35. #define GNOME_IS_VFS_DRIVE(o)       (G_TYPE_CHECK_INSTANCE_TYPE ((o), GNOME_VFS_TYPE_DRIVE))
  36. #define GNOME_IS_VFS_DRIVE_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GNOME_VFS_TYPE_DRIVE))
  37.  
  38. typedef struct _GnomeVFSDrivePrivate GnomeVFSDrivePrivate;
  39.  
  40. struct _GnomeVFSDrive {
  41.     GObject parent;
  42.  
  43.         GnomeVFSDrivePrivate *priv;
  44. };
  45.  
  46. typedef struct _GnomeVFSDriveClass GnomeVFSDriveClass;
  47.  
  48. struct _GnomeVFSDriveClass {
  49.     GObjectClass parent_class;
  50.  
  51.     void (* volume_mounted)          (GnomeVFSDrive *drive,
  52.                         GnomeVFSVolume    *volume);
  53.     void (* volume_pre_unmount)    (GnomeVFSDrive *drive,
  54.                         GnomeVFSVolume    *volume);
  55.     void (* volume_unmounted)    (GnomeVFSDrive *drive,
  56.                         GnomeVFSVolume    *volume);
  57. };
  58.  
  59. GType gnome_vfs_drive_get_type (void) G_GNUC_CONST;
  60.  
  61. GnomeVFSDrive *gnome_vfs_drive_ref   (GnomeVFSDrive *drive);
  62. void           gnome_vfs_drive_unref (GnomeVFSDrive *drive);
  63. void           gnome_vfs_drive_volume_list_free (GList *volumes);
  64.  
  65.  
  66. gulong             gnome_vfs_drive_get_id              (GnomeVFSDrive *drive);
  67. GnomeVFSDeviceType gnome_vfs_drive_get_device_type     (GnomeVFSDrive *drive);
  68.  
  69. #ifndef GNOME_VFS_DISABLE_DEPRECATED
  70. GnomeVFSVolume *   gnome_vfs_drive_get_mounted_volume  (GnomeVFSDrive *drive);
  71. #endif /*GNOME_VFS_DISABLE_DEPRECATED*/
  72.  
  73. GList *            gnome_vfs_drive_get_mounted_volumes (GnomeVFSDrive *drive);
  74. char *             gnome_vfs_drive_get_device_path     (GnomeVFSDrive *drive);
  75. char *             gnome_vfs_drive_get_activation_uri  (GnomeVFSDrive *drive);
  76. char *             gnome_vfs_drive_get_display_name    (GnomeVFSDrive *drive);
  77. char *             gnome_vfs_drive_get_icon            (GnomeVFSDrive *drive);
  78. char *             gnome_vfs_drive_get_hal_udi         (GnomeVFSDrive *drive);
  79. gboolean           gnome_vfs_drive_is_user_visible     (GnomeVFSDrive *drive);
  80. gboolean           gnome_vfs_drive_is_connected        (GnomeVFSDrive *drive);
  81. gboolean           gnome_vfs_drive_is_mounted          (GnomeVFSDrive *drive);
  82.  
  83. gint               gnome_vfs_drive_compare             (GnomeVFSDrive *a,
  84.                             GnomeVFSDrive *b);
  85.  
  86. void gnome_vfs_drive_mount   (GnomeVFSDrive             *drive,
  87.                   GnomeVFSVolumeOpCallback   callback,
  88.                   gpointer                   user_data);
  89. void gnome_vfs_drive_unmount (GnomeVFSDrive             *drive,
  90.                   GnomeVFSVolumeOpCallback   callback,
  91.                   gpointer                   user_data);
  92. void gnome_vfs_drive_eject   (GnomeVFSDrive             *drive,
  93.                   GnomeVFSVolumeOpCallback   callback,
  94.                   gpointer                   user_data);
  95.  
  96. G_END_DECLS
  97. #endif /* GNOME_VFS_DRIVE_H */
  98.  
  99.